Adjust custom target test for workspace-relative hashing
Switching to workspace-relative metadata hashing means that output can
change based on what is considered to be the top-level crate. This test
is affected by this change, but in general hashes should be more stable
than before.
This test verifies that a crate will not rebuild when built as a
dependency of two different crates but with the same CARGO_TARGET_DIR.
This currently relies on the absolute path to the crate being the same
across runs. Set an explicit workspace so the hashes will be the same
when using workspace-relative hashing.
Setting a workspace would cause the target dir to be the same in both
invocations, defeating the intent of this test, so move the target dir
between runs to verify that the contents of the target dir are not
dependent on its path.